<script lang="ts" setup>
	import { ref } from "vue";
	import { delivery, confirmReceipt, returnPay } from "@/apis/home/index";
	const chartRe = ref(null)
	const callPhone = () => {
		uni.makePhoneCall({
			phoneNumber: '18251878722'
		});
	}
	// const handleFh = () => {
	// 	// chartRe.value.click()
	// 	delivery({}).then((res : any) => {
	// 		console.log(res)
	// 		// openPay(res.data.data)
	// 	})

	// }
	// const confirmFh = () => {
	// 	// chartRe.value.click()
	// 	confirmReceipt({}).then((res : any) => {
	// 		console.log(res)
	// 		// openPay(res.data.data)
	// 	})

	// }
	// const confirmTk = () => {
	// 	// chartRe.value.click()
	// 	returnPay({}).then((res : any) => {
	// 		console.log(res)
	// 		// openPay(res.data.data)
	// 	})

	// }
</script>
<template>
	<view class="my">
		<!-- 上边 -->
		<view class="cardMY">
			<view class="cardMYTop"></view>
		</view>
		<view class="contact-box">
			<contact-button ref='chartRe' class="onLine" tnt-inst-id="fWG_XAOT" scene="SCE01271090" color="#fff" />
			<span style="display: inline-block;vertical-align: bottom;
    line-height: 120rpx;">在线客服</span>

		</view>
		<view class="contact-box" @click="callPhone">
			<span style="display: inline-block;vertical-align: bottom;
		line-height: 120rpx;">电话客服</span>

		</view>
		<!-- 发货 -->
		<!-- <view class="contact-box" @click="handleFh">
			<span style="display: inline-block;vertical-align: bottom;
		line-height: 120rpx;">1</span>

		</view> -->
		<!-- 确认收货 -->
		<!-- 	<view class="contact-box" @click="confirmFh">
			<span style="display: inline-block;vertical-align: bottom;
		line-height: 120rpx;">2</span>

		</view> -->
		<!-- 退款 -->
		<!-- <view class="contact-box" @click="confirmTk">
			<span style="display: inline-block;vertical-align: bottom;
		line-height: 120rpx;">2</span>

		</view> -->
	</view>
	<Footer :tabbar='2'></Footer>
</template>
<style lang="scss" scoped>
	.my {
		padding: 20px;
		box-sizing: border-box;
	}

	.cardMY {
		width: 100%;
		height: 400rpx;
		border-radius: 20px;
		background-color: RGB(55, 111, 244);
		box-sizing: border-box;
		background-image: url('https://fx.yunyoutongxin.com/banner/serve.jpg');
		background-size: 100% 100%;
	}

	.cardMYTop {
		width: 100%;
		padding: 30px;
		display: flex;
		align-items: center;
		box-sizing: border-box;
	}

	.imageTX {
		margin: 0;
		padding: 0;
		width: 80px;
		height: 80px;
		border-radius: 50%;
		// background-color: RGB(55, 111, 244);

	}

	.cardname {
		width: 350rpx;
		margin-left: 20px;
	}

	.cardMYBottom {
		width: 560rpx;
		height: 80rpx;
		/* padding: 30px; */
		margin: 0 auto;
		border-radius: 10px;
		// background-color: RGB(55, 111, 244);
		display: flex;
		align-items: center;
	}

	.cardMYbottom {
		width: 100%;
		// height: 700rpx;
		background-color: #fff;
		margin-top: 40px;
		border-radius: 20px;
	}
</style>
<style>
	.contact-box {
		width: 100%;
		height: 92rpx;
		background-color: #fff;
		padding: 10rpx 20rpx;
		border-radius: 6rpx;
		margin-top: 30rpx;
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 32rpx;
		font-weight: 600;
		box-sizing: border-box;
	}

	.contact-box contact-button {
		width: 100%;
		height: 100%;
		background-size: 100%;
		position: absolute;
		left: 0;
		top: 0;
		opacity: 0;
		z-index: 88;
	}
</style>